﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Template/List.master" AutoEventWireup="true"
    CodeBehind="GBusiList.aspx.cs" Inherits="MaluJg.web.Groups.GBusiList" %>

<%@ Register Src="~/Control/ListHeader.ascx" TagName="ListHeader" TagPrefix="wsc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript" src="../DatePicker/WdatePicker.js"></script>

    <script>
        function openNews() {
            var width = 820;
            var height = 640;
            window.open("GBusiEdit.aspx?NoCache=" + Math.random(), "newwindow", 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,left=' + (screen.width - width) / 2 + ',top=' + (screen.height - height) / 2);
        }

        function confirmDelete() {
            var ids = '';
            $("#tblList > tbody >tr >td >input:checked").each(function() {
                ids += ',' + this.id.substring(2);

            });

            $("#<%=tbIDs.ClientID %>").val(ids);
            if (ids == '') {
                return false;
            }
            else {

                return window.confirm('确认删除?');
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitlePlaceHolder" runat="server">
    组务列表
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="server">
    <div style="display: none">
        <asp:Button ID="btnRefresh" runat="server" OnClick="btnRefresh_Click" />
        <asp:TextBox ID="tbSelectedID" runat="server"></asp:TextBox>
    </div>
    <table cellspacing="2" cellpadding="0" border="0" width="100%">
        <tr>
            <td class="ToolMenu" style="width: 60px" runat="server" id="trAdd">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)"
                    onclick="openNews();">
                    <span>
                        <img src="../Images/Icon/Object/Dataset-add.gif" alt="" /></span><span>添加</span>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" width="60px">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <asp:LinkButton runat="server" ID="lbtnDelete" OnClick="lbtnDelete_Click" OnClientClick="return confirmDelete()">
                        <span><img src="../Images/Icon/object/Dataset-delete.gif" /></span><span>删除</span>
                    </asp:LinkButton>
                    <asp:TextBox runat="server" ID="tbIDs" Style="display: none"></asp:TextBox>
                </div>
            </td>
            <td class="Fg">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="AdvancedSearchPlaceHolder" runat="server">
    <table cellspacing="4" cellpadding="0" border="0" width="100%">
        <tr>
            <td width="100">
                &nbsp;组名：
            </td>
            <td align="left">
                <asp:TextBox ID="tbName" runat="server" MaxLength="20" class="Textbox01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;时间：
            </td>
            <td align="left">
                <asp:TextBox runat="server" ID="tbStart" onclick="WdatePicker()" CssClass="Textbox01"></asp:TextBox>-<asp:TextBox
                    runat="server" ID="tbEnd" onclick="WdatePicker()" CssClass="Textbox01"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                <asp:Button ID="btnAdvancedSearch" runat="server" CssClass="Button01" Text="开始查询"
                    OnClick="btnAdvancedSearch_Click" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ListHeaderPlaceHolder" runat="server">
    <table cellspacing="0" cellpadding="0" border="0" class="PageGridHeader" width="100%">
        <wsc:ListHeader ID="lhPK" runat="server" Type="CheckBox" Align="center" Width="30" />
        <wsc:ListHeader ID="lhGroupName" runat="server" Title="&nbsp;组名" Align="center" />
        <wsc:ListHeader ID="lhCreateTime" runat="server" Title="&nbsp;提交时间" Width="160" Align="center" />
        <wsc:ListHeader ID="lhModifyTime" runat="server" Title="&nbsp; 最后修改时间" Width="160"
            Align="center" />
    </table>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="ListContentPlaceHolder" runat="server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="MainInfolist"
        id="tblList">
        <asp:Repeater ID="rptBusi" runat="server">
            <ItemTemplate>
                <tr id="T_<%# Container.ItemIndex%>" style="cursor: hand" class="Normal" oldclass="Normal"
                    onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)" onclick="ClickChangeClass(this);OpenDetail('GBusiDetail.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "ID")%>&Nocache=' + Math.random());">
                    <td width="30" align="center">
                        <input id="cb<%# DataBinder.Eval(Container.DataItem, "ID")%>" type="checkbox" name="cb<%# DataBinder.Eval(Container.DataItem, "ID")%>" />
                    </td>
                    <td align="left">
                        &nbsp;<%# DataBinder.Eval(Container.DataItem, "GroupName")%>
                    </td>
                    <td width="160" align="left">
                        &nbsp;<%# DataBinder.Eval(Container.DataItem, "CreateTime")%>
                    </td>
                    <td width="160" align="left">
                        &nbsp;<%# DataBinder.Eval(Container.DataItem, "ModifyTime")%>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
